package com.bright.hxj.cwduijie.pojo.bo;

import lombok.AllArgsConstructor;
import lombok.Data;

import java.util.List;

/**
 * @Author hxj
 * @Date 2025/7/25 17:36
 * @Description 存储过程信息类
 */
@Data
public class ProcInfo {

    public static final Integer INT = 1, VARCHAR = 2;
    public static final ProcArg YEARS = new ProcArg("years", INT);
    public static final ProcArg MONTHS = new ProcArg("months", INT);
    public static final ProcArg ACC_SET = new ProcArg("acc_set", INT);
    public static final ProcArg ACC_MODAL = new ProcArg("acc_modal", INT);

    String procName;

    List<Integer> argTypes;
    List<ProcArg> args;

    boolean hasMsg;

    public ProcInfo(String procName, List<Integer> argTypes, boolean hasMsg) {
        setProcName(procName);
        setArgTypes(argTypes);
        setHasMsg(hasMsg);
    }

//    public ProcInfo(String procName, List<ProcArg> args, boolean hasMsg) {
//        setProcName(procName);
//        setArgs(args);
//        setHasMsg(hasMsg);
//    }

    public ProcInfo(String procName, List<ProcArg> args) {
        setProcName(procName);
        setArgs(args);
        setHasMsg(true);
    }

    @AllArgsConstructor
    public static class ProcArg {

        String argName;
        Integer argType;

    }

}
